<!--{include(file='head.html')}-->

<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div id="main_c" >
			<form name="seaform" id="seaform" action="" method="post">
				<div class="bt_bk">
					<span class="btn">
						<a href="javascript:void(0);" onclick="$.oper.cdelete();return false;">删除</a>
						<a href="javascript:void(0);" onclick="$.oper.backup();return false;">开始备份</a>
					</span>
					<span class="state_tip"></span>
				</div>
			</form>
			<table class="tableStyle" border="0" cellspacing="0" cellpadding="0">
				<thead>
					<tr align="center">
						<th width="10%">
							<input type="checkbox" value="1" name="allselect" id="allselect" autocomplete="off" onclick="$.oper.selectall()"/>
						</th>
						<th width="10%">操作</th>
						<th width="40%">备份文件名</th>
						<th width="10%">分卷大小</th>
						<th width="30%">备份时间</th>
					</tr>
				</thead>
				<tbody id="listtbody">
					<!--{foreach $files key file}-->
					<tr align="center" id="tr_<!--{$key}-->">
						<td><input type="checkbox" value="<!--{$key}-->" name="singleselect" autocomplete="off"/></td>
						<td>
							<a href="javascript:void(0);" onclick="$.oper.importdb('<!--{$key}-->');return false;" class="import"></a>
							<a href="javascript:void(0);" onclick="$.oper.cdelete('<!--{$key}-->');return false;" class="del"></a>
						</td>
						<td><!--{$key}-->.bak</td>
						<td>
							<!--{$file.vol}-->
						</td>
						<td><!--{date("m月d日",$file.filetime)}--></td>
					</tr>
					<!--{/foreach}-->
				</tbody>
			</table>
		</div>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	$.oper.init("<!--{url('admin','data','backupsave')}-->");
	$.oper.backup = function(){
		$(".state_tip").html("<!--{__('backup_vol',1)}-->");
		$.oper.runjs("<!--{url('admin','data','backupok')}-->");
	}
	$.oper.importdb = function(filename) {
		jConfirm("数据将恢复到备份文件时，确定吗？","确认信息",function(confirm){
			if(confirm) {
				$(".state_tip").html("<!--{__('import_vol',1)}-->");
				$.oper.runjs("<!--{url('admin','data','import')}-->&filename="+filename);
			}
		})
	}
});
</script>